<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>AI交友 - 智能筛选</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #6366f1;
            --primary-light: #a5b4fc;
            --primary-dark: #4338ca;
            --secondary: #10b981;
            --accent: #f97316;
            --danger: #ef4444;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --bg-light: #f3f4f6;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 12px;
            --shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 55px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 55px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
            box-shadow: var(--shadow);
        }
        
        .nav-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--primary-dark);
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 搜索栏 */
        .search-container {
            padding: 12px 15px;
            background-color: var(--bg-white);
        }
        
        .search-group {
            position: relative;
        }
        
        .search-input {
            width: 100%;
            padding: 12px 15px 12px 45px;
            border-radius: 30px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            font-size: 0.9rem;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }
        
        /* 基础筛选工具栏 */
        .filter-bar {
            display: flex;
            padding: 8px 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            overflow-x: auto;
            scrollbar-width: none;
        }
        
        .filter-bar::-webkit-scrollbar {
            display: none;
        }
        
        .filter-item {
            white-space: nowrap;
            padding: 6px 14px;
            margin-right: 8px;
            border-radius: 20px;
            font-size: 0.85rem;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            display: flex;
            align-items: center;
        }
        
        .filter-item.active {
            background-color: var(--primary);
            color: white;
        }
        
        .filter-item i {
            margin-right: 5px;
        }
        
        /* 高级筛选弹窗 */
        .advanced-filter-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1010;
            display: none;
            justify-content: flex-end;
        }
        
        .advanced-filter-modal.show {
            display: flex;
        }
        
        .filter-content {
            width: 100%;
            max-width: 350px;
            background-color: var(--bg-white);
            border-radius: var(--radius) var(--radius) 0 0;
            padding: 20px 15px;
            overflow-y: auto;
            max-height: 90vh;
        }
        
        .filter-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border-light);
        }
        
        .filter-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .close-filter {
            background: none;
            border: none;
            font-size: 1.2rem;
            color: var(--text-secondary);
        }
        
        .filter-section {
            margin-bottom: 25px;
        }
        
        .filter-section-title {
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--text-primary);
        }
        
        /* 滑块筛选 */
        .range-slider {
            width: 100%;
            margin: 15px 0;
        }
        
        .range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 5px;
        }
        
        /* 标签筛选 */
        .tags-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 10px;
        }
        
        .tag-option {
            padding: 6px 12px;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border-radius: 20px;
            font-size: 0.8rem;
            border: none;
            white-space: nowrap;
        }
        
        .tag-option.selected {
            background-color: var(--primary);
            color: white;
        }
        
        /* 复选框筛选 */
        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .custom-checkbox {
            width: 18px;
            height: 18px;
            border-radius: 4px;
            border: 2px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        
        .custom-checkbox.checked {
            background-color: var(--primary);
            border-color: var(--primary);
            color: white;
        }
        
        .checkbox-label {
            font-size: 0.9rem;
            color: var(--text-primary);
        }
        
        /* 筛选操作按钮 */
        .filter-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid var(--border-light);
        }
        
        .reset-filter {
            flex: 1;
            padding: 12px 0;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
        }
        
        .apply-filter {
            flex: 1;
            padding: 12px 0;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
        }
        
        /* 智能筛选建议 */
        .smart-filters {
            padding: 15px;
            background-color: var(--bg-white);
            margin: 10px 15px;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
        }
        
        .smart-filters-title {
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 5px;
            color: var(--primary);
        }
        
        .smart-filter-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .smart-filter-tag {
            padding: 6px 12px;
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            border-radius: 20px;
            font-size: 0.85rem;
            border: none;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        /* AI交友列表 */
        .ai-list {
            padding: 0 15px;
        }
        
        .ai-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            margin-top: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.2s ease;
        }
        
        .ai-card:hover {
            transform: translateY(-2px);
        }
        
        /* 无图AI卡片 */
        .ai-card.no-image .card-body {
            padding: 18px 15px;
        }
        
        /* 单图AI卡片 */
        .ai-card.single-image .card-image {
            height: 200px;
        }
        
        /* 多图AI卡片 */
        .card-image-container {
            position: relative;
        }
        
        .card-image {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }
        
        .multi-image {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 3px;
            height: 160px;
        }
        
        .multi-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .image-count {
            position: absolute;
            right: 8px;
            bottom: 8px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        /* AI信息 */
        .card-body {
            padding: 15px;
        }
        
        .ai-header {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .ai-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-light);
        }
        
        .ai-info {
            margin-left: 12px;
            flex: 1;
        }
        
        .ai-name {
            font-weight: 600;
            font-size: 1rem;
            display: flex;
            align-items: center;
        }
        
        .ai-badge {
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            font-size: 0.7rem;
            padding: 1px 6px;
            border-radius: 4px;
            margin-left: 6px;
        }
        
        .ai-meta {
            font-size: 0.8rem;
            color: var(--text-light);
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 3px;
        }
        
        .ai-description {
            font-size: 0.9rem;
            line-height: 1.5;
            color: var(--text-primary);
            margin-bottom: 12px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 兴趣标签 */
        .interests {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 12px;
        }
        
        .interest-tag {
            padding: 3px 10px;
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            border-radius: 12px;
            font-size: 0.75rem;
        }
        
        /* 匹配度 */
        .match-rate {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            font-size: 0.85rem;
        }
        
        .match-label {
            color: var(--text-secondary);
            margin-right: 8px;
        }
        
        .match-bar {
            flex: 1;
            height: 6px;
            background-color: var(--bg-light);
            border-radius: 3px;
            overflow: hidden;
        }
        
        .match-progress {
            height: 100%;
            background-color: var(--secondary);
            border-radius: 3px;
        }
        
        .match-percent {
            margin-left: 8px;
            font-weight: 500;
            color: var(--secondary);
        }
        
        /* 操作按钮 */
        .action-buttons {
            display: flex;
            gap: 10px;
        }
        
        .primary-btn {
            flex: 1;
            padding: 10px 0;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .primary-btn:hover {
            background-color: var(--primary-dark);
        }
        
        .secondary-btn {
            flex: 1;
            padding: 10px 0;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .secondary-btn:hover {
            background-color: #e5e7eb;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 65px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            text-decoration: none;
        }
        
        .nav-item i {
            font-size: 1.3rem;
            margin-bottom: 3px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .smart-match-btn {
            width: 55px;
            height: 55px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.6rem;
            margin-top: -28px;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
            border: 4px solid var(--bg-light);
        }
        
        /* 加载更多 */
        .load-more {
            width: 100%;
            padding: 10px;
            margin: 15px 0;
            background-color: var(--bg-white);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            color: var(--text-secondary);
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        /* 骨架屏 */
        .skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: skeleton-loading 1.5s infinite;
        }
        
        @keyframes skeleton-loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        /* 筛选标签 */
        .active-filters {
            padding: 8px 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }
        
        .active-filter-tag {
            padding: 4px 10px;
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            border-radius: 15px;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .remove-filter {
            background: none;
            border: none;
            color: var(--primary);
            font-size: 0.9rem;
            cursor: pointer;
        }
        
        .clear-all-filters {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 0.8rem;
            margin-left: auto;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action">
            <i class="fas fa-cog"></i>
        </button>
        <div class="nav-title">AI智能匹配</div>
        <button class="nav-action">
            <i class="far fa-bell"></i>
        </button>
    </div>
    
    <!-- 搜索栏 -->
    <div class="search-container">
        <div class="search-group">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索AI伙伴、兴趣或标签...">
        </div>
    </div>
    
    <!-- 基础筛选工具栏 -->
    <div class="filter-bar">
        <button class="filter-item active">
            <i class="fas fa-fire"></i>推荐
        </button>
        <button class="filter-item">
            <i class="fas fa-star"></i>高匹配
        </button>
        <button class="filter-item">
            <i class="fas fa-clock"></i>最新
        </button>
        <button class="filter-item">
            <i class="fas fa-image"></i>有图
        </button>
        <button class="filter-item">
            <i class="fas fa-comment"></i>活跃
        </button>
        <button class="filter-item" id="advancedFilterBtn">
            <i class="fas fa-sliders-h"></i>更多筛选
        </button>
    </div>
    
    <!-- 已选筛选条件 -->
    <div class="active-filters" style="display: none;">
        <div class="active-filter-tag">
            匹配度 ≥ 80%
            <button class="remove-filter"><i class="fas fa-times"></i></button>
        </div>
        <div class="active-filter-tag">
            情感陪伴
            <button class="remove-filter"><i class="fas fa-times"></i></button>
        </div>
        <button class="clear-all-filters">清除全部</button>
    </div>
    
    <!-- 智能筛选建议 -->
    <div class="smart-filters">
        <div class="smart-filters-title">
            <i class="fas fa-lightbulb"></i>智能推荐筛选
        </div>
        <div class="smart-filter-tags">
            <button class="smart-filter-tag">
                <i class="fas fa-magic"></i>根据你的兴趣
            </button>
            <button class="smart-filter-tag">
                <i class="fas fa-history"></i>浏览过的类型
            </button>
            <button class="smart-filter-tag">
                <i class="fas fa-users"></i>好友互动过
            </button>
        </div>
    </div>
    
    <!-- AI交友列表 -->
    <div class="ai-list">
        <!-- 无图AI卡片 -->
        <div class="ai-card no-image">
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1005/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">
                            星辰AI
                            <span class="ai-badge">新上线</span>
                        </div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 情感陪伴</span>
                            <span><i class="fas fa-map-marker-alt"></i> 虚拟位置</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    我是一个专注于情感陪伴的AI伙伴，擅长倾听和提供情感支持。无论你是想聊天、分享心事还是寻求建议，我都会在这里陪伴你。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">情感倾听</span>
                    <span class="interest-tag">心理咨询</span>
                    <span class="interest-tag">生活建议</span>
                    <span class="interest-tag">聊天陪伴</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 87%"></div>
                    </div>
                    <span class="match-percent">87%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="far fa-heart"></i> 收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 单图AI卡片 -->
        <div class="ai-card single-image">
            <div class="card-image-container">
                <img src="https://picsum.photos/id/1035/800/400" alt="AI展示图" class="card-image">
            </div>
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1012/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">
                            旅行AI
                            <span class="ai-badge">热门</span>
                        </div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 旅行顾问</span>
                            <span><i class="fas fa-users"></i> 1.2k互动</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    专注于旅行规划和攻略的AI助手，能为你推荐最佳旅行路线、美食和景点，让你的旅程更加精彩。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">旅行规划</span>
                    <span class="interest-tag">美食推荐</span>
                    <span class="interest-tag">景点攻略</span>
                    <span class="interest-tag">摄影</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 76%"></div>
                    </div>
                    <span class="match-percent">76%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="far fa-heart"></i> 收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 多图AI卡片 -->
        <div class="ai-card multi-image-card">
            <div class="card-image-container">
                <div class="multi-image">
                    <img src="https://picsum.photos/id/292/400/400" alt="AI展示图1">
                    <img src="https://picsum.photos/id/431/400/400" alt="AI展示图2">
                    <img src="https://picsum.photos/id/488/400/400" alt="AI展示图3">
                    <img src="https://picsum.photos/id/312/400/400" alt="AI展示图4">
                </div>
                <div class="image-count">4图</div>
            </div>
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1025/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">美食AI</div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 美食专家</span>
                            <span><i class="fas fa-users"></i> 3.5k互动</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    热爱美食的AI伙伴，能为你推荐各地特色美食、分享食谱和烹饪技巧，一起探索美食的世界。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">美食推荐</span>
                    <span class="interest-tag">食谱分享</span>
                    <span class="interest-tag">烹饪技巧</span>
                    <span class="interest-tag">餐厅测评</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 92%"></div>
                    </div>
                    <span class="match-percent">92%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="fas fa-heart"></i> 已收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <button class="load-more">
            <i class="fas fa-spinner fa-spin"></i>
            <span>加载更多AI伙伴</span>
        </button>
    </div>
    
    <!-- 高级筛选弹窗 -->
    <div class="advanced-filter-modal" id="advancedFilterModal">
        <div class="filter-content">
            <div class="filter-header">
                <div class="filter-title">高级筛选</div>
                <button class="close-filter" id="closeFilterBtn">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <!-- 匹配度筛选 -->
            <div class="filter-section">
                <div class="filter-section-title">匹配度范围</div>
                <input type="range" min="0" max="100" value="80" class="range-slider" id="matchRange">
                <div class="range-labels">
                    <span>0%</span>
                    <span id="rangeValue">≥ 80%</span>
                    <span>100%</span>
                </div>
            </div>
            
            <!-- AI类型筛选 -->
            <div class="filter-section">
                <div class="filter-section-title">AI类型</div>
                <div class="tags-filter">
                    <button class="tag-option">情感陪伴</button>
                    <button class="tag-option">知识问答</button>
                    <button class="tag-option">兴趣爱好</button>
                    <button class="tag-option">学习辅导</button>
                    <button class="tag-option">生活助手</button>
                    <button class="tag-option">创意灵感</button>
                </div>
            </div>
            
            <!-- 活跃度筛选 -->
            <div class="filter-section">
                <div class="filter-section-title">活跃度</div>
                <div class="checkbox-group">
                    <div class="checkbox-item">
                        <div class="custom-checkbox">
                            <i class="fas fa-check" style="display: none;"></i>
                        </div>
                        <span class="checkbox-label">超高活跃（每日更新）</span>
                    </div>
                    <div class="checkbox-item">
                        <div class="custom-checkbox checked">
                            <i class="fas fa-check"></i>
                        </div>
                        <span class="checkbox-label">高活跃（每周更新）</span>
                    </div>
                    <div class="checkbox-item">
                        <div class="custom-checkbox">
                            <i class="fas fa-check" style="display: none;"></i>
                        </div>
                        <span class="checkbox-label">一般活跃（每月更新）</span>
                    </div>
                </div>
            </div>
            
            <!-- 内容筛选 -->
            <div class="filter-section">
                <div class="filter-section-title">内容形式</div>
                <div class="checkbox-group">
                    <div class="checkbox-item">
                        <div class="custom-checkbox checked">
                            <i class="fas fa-check"></i>
                        </div>
                        <span class="checkbox-label">纯文字互动</span>
                    </div>
                    <div class="checkbox-item">
                        <div class="custom-checkbox checked">
                            <i class="fas fa-check"></i>
                        </div>
                        <span class="checkbox-label">包含图片</span>
                    </div>
                    <div class="checkbox-item">
                        <div class="custom-checkbox">
                            <i class="fas fa-check" style="display: none;"></i>
                        </div>
                        <span class="checkbox-label">包含语音</span>
                    </div>
                    <div class="checkbox-item">
                        <div class="custom-checkbox">
                            <i class="fas fa-check" style="display: none;"></i>
                        </div>
                        <span class="checkbox-label">包含视频</span>
                    </div>
                </div>
            </div>
            
            <!-- 筛选操作按钮 -->
            <div class="filter-actions">
                <button class="reset-filter">重置筛选</button>
                <button class="apply-filter">应用筛选</button>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item active">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-compass"></i>
            <span>发现</span>
        </a>
        <button class="smart-match-btn">
            <i class="fas fa-magic"></i>
        </button>
        <a href="#" class="nav-item">
            <i class="far fa-comment"></i>
            <span>消息</span>
        </a>
        <a href="#" class="nav-item">
            <i class="far fa-user"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 基础筛选按钮切换
        const filterItems = document.querySelectorAll('.filter-item:not(#advancedFilterBtn)');
        filterItems.forEach(item => {
            item.addEventListener('click', () => {
                filterItems.forEach(i => i.classList.remove('active'));
                item.classList.add('active');
                applyFilters();
            });
        });
        
        // 高级筛选弹窗控制
        const advancedFilterBtn = document.getElementById('advancedFilterBtn');
        const advancedFilterModal = document.getElementById('advancedFilterModal');
        const closeFilterBtn = document.getElementById('closeFilterBtn');
        
        advancedFilterBtn.addEventListener('click', () => {
            advancedFilterModal.classList.add('show');
            document.body.style.overflow = 'hidden';
        });
        
        closeFilterBtn.addEventListener('click', () => {
            advancedFilterModal.classList.remove('show');
            document.body.style.overflow = '';
        });
        
        // 点击弹窗外部关闭
        advancedFilterModal.addEventListener('click', (e) => {
            if (e.target === advancedFilterModal) {
                advancedFilterModal.classList.remove('show');
                document.body.style.overflow = '';
            }
        });
        
        // 匹配度滑块
        const matchRange = document.getElementById('matchRange');
        const rangeValue = document.getElementById('rangeValue');
        
        matchRange.addEventListener('input', () => {
            rangeValue.textContent = `≥ ${matchRange.value}%`;
        });
        
        // 标签筛选选择
        const tagOptions = document.querySelectorAll('.tag-option');
        tagOptions.forEach(tag => {
            tag.addEventListener('click', () => {
                tag.classList.toggle('selected');
            });
        });
        
        // 复选框选择
        const customCheckboxes = document.querySelectorAll('.custom-checkbox');
        customCheckboxes.forEach(checkbox => {
            checkbox.addEventListener('click', () => {
                checkbox.classList.toggle('checked');
                const checkIcon = checkbox.querySelector('i');
                checkIcon.style.display = checkbox.classList.contains('checked') ? 'block' : 'none';
            });
        });
        
        // 应用筛选
        const applyFilterBtn = document.querySelector('.apply-filter');
        applyFilterBtn.addEventListener('click', () => {
            advancedFilterModal.classList.remove('show');
            document.body.style.overflow = '';
            
            // 显示已选筛选条件
            document.querySelector('.active-filters').style.display = 'flex';
            
            // 应用筛选并刷新列表
            applyFilters();
        });
        
        // 重置筛选
        const resetFilterBtn = document.querySelector('.reset-filter');
        resetFilterBtn.addEventListener('click', () => {
            // 重置滑块
            matchRange.value = 0;
            rangeValue.textContent = `≥ 0%`;
            
            // 重置标签
            tagOptions.forEach(tag => {
                tag.classList.remove('selected');
            });
            
            // 重置复选框
            customCheckboxes.forEach(checkbox => {
                checkbox.classList.remove('checked');
                checkbox.querySelector('i').style.display = 'none';
            });
        });
        
        // 移除单个筛选条件
        const removeFilterBtns = document.querySelectorAll('.remove-filter');
        removeFilterBtns.forEach(btn => {
            btn.addEventListener('click', (e) => {
                e.target.closest('.active-filter-tag').remove();
                
                // 如果没有筛选条件了，隐藏整个容器
                if (document.querySelectorAll('.active-filter-tag').length === 0) {
                    document.querySelector('.active-filters').style.display = 'none';
                }
                
                applyFilters();
            });
        });
        
        // 清除所有筛选条件
        document.querySelector('.clear-all-filters').addEventListener('click', () => {
            document.querySelectorAll('.active-filter-tag').forEach(tag => {
                tag.remove();
            });
            document.querySelector('.active-filters').style.display = 'none';
            
            // 重置基础筛选为推荐
            filterItems.forEach(i => i.classList.remove('active'));
            filterItems[0].classList.add('active');
            
            // 重置高级筛选
            resetFilterBtn.click();
            
            applyFilters();
        });
        
        // 智能筛选标签
        const smartFilterTags = document.querySelectorAll('.smart-filter-tag');
        smartFilterTags.forEach(tag => {
            tag.addEventListener('click', () => {
                showToast(`已应用: ${tag.textContent.trim()}`);
                applyFilters();
            });
        });
        
        // 应用筛选并显示加载状态
        function applyFilters() {
            const aiList = document.querySelector('.ai-list');
            const originalContent = aiList.innerHTML;
            
            // 显示骨架屏
            aiList.innerHTML = `
                <div class="ai-card no-image">
                    <div class="card-body">
                        <div class="ai-header">
                            <div class="skeleton skeleton-avatar"></div>
                            <div class="ai-info">
                                <div class="skeleton skeleton-title"></div>
                                <div class="skeleton skeleton-meta"></div>
                            </div>
                        </div>
                        <div class="skeleton skeleton-text long"></div>
                        <div class="skeleton skeleton-text short"></div>
                        <div style="margin: 10px 0;">
                            <div class="skeleton skeleton-tag"></div>
                            <div class="skeleton skeleton-tag"></div>
                            <div class="skeleton skeleton-tag"></div>
                        </div>
                        <div class="match-rate" style="margin: 10px 0;">
                            <span class="match-label">匹配度</span>
                            <div class="match-bar">
                                <div class="skeleton skeleton-bar"></div>
                            </div>
                            <span class="match-percent">--%</span>
                        </div>
                        <div class="action-buttons">
                            <div class="skeleton skeleton-button" style="flex: 1;"></div>
                            <div class="skeleton skeleton-button" style="flex: 1; margin-left: 10px;"></div>
                        </div>
                    </div>
                </div>
                <div class="ai-card single-image">
                    <div class="card-image-container">
                        <div class="skeleton" style="width: 100%; height: 200px;"></div>
                    </div>
                    <div class="card-body">
                        <div class="ai-header">
                            <div class="skeleton skeleton-avatar"></div>
                            <div class="ai-info">
                                <div class="skeleton skeleton-title"></div>
                                <div class="skeleton skeleton-meta"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <button class="load-more">
                    <i class="fas fa-spinner fa-spin"></i>
                    <span>加载更多AI伙伴</span>
                </button>
            `;
            
            // 模拟加载延迟
            setTimeout(() => {
                aiList.innerHTML = originalContent;
                bindEvents();
            }, 1500);
        }
        
        // 收藏和聊天功能
        function bindEvents() {
            // 收藏功能
            const favoriteButtons = document.querySelectorAll('.secondary-btn');
            favoriteButtons.forEach(btn => {
                if (btn.querySelector('.fa-heart')) {
                    btn.addEventListener('click', () => {
                        const icon = btn.querySelector('i');
                        
                        if (icon.classList.contains('far')) {
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            btn.innerHTML = '<i class="fas fa-heart"></i> 已收藏';
                            showToast('收藏成功');
                        } else {
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            btn.innerHTML = '<i class="far fa-heart"></i> 收藏';
                            showToast('取消收藏');
                        }
                    });
                }
            });
            
            // 聊天按钮
            const chatButtons = document.querySelectorAll('.primary-btn');
            chatButtons.forEach(btn => {
                if (btn.querySelector('.fa-comment')) {
                    btn.addEventListener('click', () => {
                        const aiName = btn.closest('.ai-card').querySelector('.ai-name').textContent.trim();
                        showToast(`正在打开与${aiName}的聊天窗口`);
                    });
                }
            });
            
            // 加载更多
            document.querySelector('.load-more').addEventListener('click', function() {
                const btn = this;
                const originalText = btn.innerHTML;
                btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i><span>加载中...</span>';
                btn.disabled = true;
                
                // 模拟加载延迟
                setTimeout(() => {
                    btn.innerHTML = originalText;
                    btn.disabled = false;
                    
                    // 复制最后一个AI卡片并修改内容
                    const aiList = document.querySelector('.ai-list');
                    const lastCard = aiList.querySelector('.ai-card:last-of-type');
                    
                    if (lastCard) {
                        const clone = lastCard.cloneNode(true);
                        // 修改一些内容以示区别
                        const randomId = Math.floor(Math.random() * 100) + 200;
                        clone.querySelector('.ai-avatar').src = `https://picsum.photos/id/${randomId}/200/200`;
                        
                        // 修改匹配度
                        const matchPercent = Math.floor(Math.random() * 30) + 60;
                        clone.querySelector('.match-progress').style.width = `${matchPercent}%`;
                        clone.querySelector('.match-percent').textContent = `${matchPercent}%`;
                        
                        // 移除收藏状态
                        const favoriteBtn = clone.querySelector('.secondary-btn');
                        if (favoriteBtn.querySelector('.fas.fa-heart')) {
                            favoriteBtn.innerHTML = '<i class="far fa-heart"></i> 收藏';
                        }
                        
                        aiList.insertBefore(clone, btn);
                    }
                    
                    bindEvents();
                }, 1500);
            });
        }
        
        // 智能匹配按钮
        document.querySelector('.smart-match-btn').addEventListener('click', () => {
            showToast('正在为你智能匹配最合适的AI伙伴...');
            applyFilters();
        });
        
        // 提示消息
        function showToast(message) {
            // 检查是否已有toast
            let toast = document.querySelector('.toast-notification');
            if (toast) {
                toast.remove();
            }
            
            // 创建新toast
            toast = document.createElement('div');
            toast.className = 'toast-notification';
            toast.style.position = 'fixed';
            toast.style.bottom = '80px';
            toast.style.left = '50%';
            toast.style.transform = 'translateX(-50%)';
            toast.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
            toast.style.color = 'white';
            toast.style.padding = '8px 16px';
            toast.style.borderRadius = '4px';
            toast.style.zIndex = '9999';
            toast.style.fontSize = '0.9rem';
            toast.textContent = message;
            
            document.body.appendChild(toast);
            
            // 3秒后移除
            setTimeout(() => {
                toast.style.opacity = '0';
                toast.style.transition = 'opacity 0.3s ease';
                setTimeout(() => toast.remove(), 300);
            }, 3000);
        }
        
        // 初始化绑定事件
        bindEvents();
    </script>
</body>
</html>

